Function.prototype.zhbind = function (thisArg, ...args) {
  var fn = this;
  thisArg =
    thisArg !== undefined && thisArg !== null ? Object(thisArg) : window;
  var proxyfn = function (...args2) {
    thisArg.fn = fn;
    var result = thisArg.fn(...args, ...args2);
    delete thisArg.fn;
    return result;
  };
  return proxyfn;
};
function foo(num1, num2) {
  console.log("foo被执行了", this, num1, num2);
}

function sum(num1, num2) {
  console.log("sum被执行了", this, num1, num2);
}
var bindfoo = foo.zhbind("foobind", 45, 56);

console.log(`bindfoo`, bindfoo(12, 23));
//原声bind的传参方式可以在 sum.bind（‘bind’， 12， 11）， 或者是 bar（11， 12）
const bar = sum.bind("bind", 88, 99);
bar(12, 11);
